package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.TbDeviceAppLogsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbDeviceAppLogsMapper;
import com.ruoyi.system.domain.TbDeviceAppLogs;
import com.ruoyi.system.service.ITbDeviceAppLogsService;

/**
 * 设备应用更新日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-23
 */
@Service
public class TbDeviceAppLogsServiceImpl implements ITbDeviceAppLogsService 
{
    @Autowired
    private TbDeviceAppLogsMapper tbDeviceAppLogsMapper;

    /**
     * 查询设备应用更新日志
     * 
     * @param id 设备应用更新日志主键
     * @return 设备应用更新日志
     */
    @Override
    public TbDeviceAppLogs selectTbDeviceAppLogsById(Long id)
    {
        return tbDeviceAppLogsMapper.selectTbDeviceAppLogsById(id);
    }

    /**
     * 查询设备应用更新日志列表
     * 
     * @param tbDeviceAppLogs 设备应用更新日志
     * @return 设备应用更新日志
     */
    @Override
    public List<TbDeviceAppLogsVO> selectTbDeviceAppLogsList(TbDeviceAppLogs tbDeviceAppLogs)
    {
        return tbDeviceAppLogsMapper.selectTbDeviceAppLogsList(tbDeviceAppLogs);
    }

    /**
     * 新增设备应用更新日志
     * 
     * @param tbDeviceAppLogs 设备应用更新日志
     * @return 结果
     */
    @Override
    public int insertTbDeviceAppLogs(TbDeviceAppLogs tbDeviceAppLogs)
    {
        tbDeviceAppLogs.setCreateTime(DateUtils.getNowDate());
        return tbDeviceAppLogsMapper.insertTbDeviceAppLogs(tbDeviceAppLogs);
    }

    /**
     * 修改设备应用更新日志
     * 
     * @param tbDeviceAppLogs 设备应用更新日志
     * @return 结果
     */
    @Override
    public int updateTbDeviceAppLogs(TbDeviceAppLogs tbDeviceAppLogs)
    {
        tbDeviceAppLogs.setUpdateTime(DateUtils.getNowDate());
        return tbDeviceAppLogsMapper.updateTbDeviceAppLogs(tbDeviceAppLogs);
    }

    /**
     * 批量删除设备应用更新日志
     * 
     * @param ids 需要删除的设备应用更新日志主键
     * @return 结果
     */
    @Override
    public int deleteTbDeviceAppLogsByIds(Long[] ids)
    {
        return tbDeviceAppLogsMapper.deleteTbDeviceAppLogsByIds(ids);
    }

    /**
     * 删除设备应用更新日志信息
     * 
     * @param id 设备应用更新日志主键
     * @return 结果
     */
    @Override
    public int deleteTbDeviceAppLogsById(Long id)
    {
        return tbDeviceAppLogsMapper.deleteTbDeviceAppLogsById(id);
    }
}
